package com.itheima.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class TestController  {

    @RequestMapping("/demo")
    public ModelAndView show(){
        System.out.println("ffffff");
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("name","sss");
        modelAndView.setViewName("index");
        return modelAndView;
    }
}
